<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../lib/react.development.js"></script>
    <script src="../lib/react-dom.development.js"></script>
    <script src="../lib/babel.min.js"></script>
    <style>
        .box{
            width: 200px;
            height: 200px;
            border: 1px solid red;
        }
        .c1{
            color: red;
        }
        .f1{
            font-size: 40px;
        }
    </style>
</head>
<div id="root">

</div>

<body>
    <script type="text/babel">
        const root = ReactDOM.createRoot(document.getElementById('root'));
        const class1 = 'box c1 f1'
        const class2 = ['box','c1','f1']
        // 是遍历挨个渲染
        root.render((
            <div>
                <h3>样式类名</h3>
                <div className="box">
                    box1
                </div>
                <div className="box c1 f1">
                    box2
                </div>
                <h2></h2>
                <h3>插值表达式处理样式</h3>
                <div className={class1}>
                    box3
                </div>
                <div className={class2.join(' ')}>
                    box4
                </div>

            </div>
        ));
    </script>
</body>
</html>